﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AlarmClock
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入当前时间：");
            String[] array = Console.ReadLine().Split(' ');
            try
            {
                Sender sender = new Sender(int.Parse(array[0]), int.Parse(array[1]), int.Parse(array[2]));
            }
            catch(Exception e)
            {
                Console.WriteLine("出现异常：" + e.Message);
            }
            finally
            {
                Sender sender = new Sender(int.Parse(array[0]), int.Parse(array[1]), int.Parse(array[2]));
                Console.WriteLine("输入闹钟设置时间：");
                String[] array1 = Console.ReadLine().Split(' ');
                sender.clock.SetAlarm(int.Parse(array1[0]), int.Parse(array1[1]), int.Parse(array1[2]));
                sender.clock.Clock_start();
            }
            
        }
    }
}
